<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
		xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
<xsl:template match="expensa.xsl">


<fo:root xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<fo:layout-master-set>
		<fo:simple-page-master master-name="default-page" page-height="6.69in" page-width="8.27in" margin-left="14mm" margin-right="9mm" margin-top="6mm" margin-bottom="6mm">
			<fo:region-after extent="10cm"/>
			<fo:region-body margin-top="0.05in" margin-bottom="0.05in"/>
		</fo:simple-page-master>
	</fo:layout-master-set>

	<fo:page-sequence master-reference="default-page" initial-page-number="1" format="1">

<!-- FOOTER -->
		<fo:static-content flow-name="xsl-region-after">
			<fo:block>

				<fo:table space-before="1mm" width="100%" font-size="small" table-layout="fixed" >
					<fo:table-column column-width="proportional-column-width(1)"/>
					<fo:table-column column-width="proportional-column-width(1)"/>
					<fo:table-column column-width="proportional-column-width(1)"/>
					
					<fo:table-body start-indent="0pt">
						<fo:table-row height="10mm">
							<fo:table-cell display-align="center">
								<fo:block>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell display-align="center" >
								<fo:block>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell display-align="center" padding-left="4mm" padding-right="4mm" border-color="black" border-width="1pt" border-after-style="solid">
								<fo:block font-size="7pt" font-weight="normal" >
									<xsl:apply-templates select="signature"/>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
						<fo:table-row height="4mm">
							<fo:table-cell display-align="center" text-align="center">
								<fo:block></fo:block>
							</fo:table-cell>
							<fo:table-cell display-align="center" >
								<fo:block>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell display-align="center" text-align="center" >
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>
										Administrador.
									</fo:inline>
								</fo:block>
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>
										Buildadmin S.A.
									</fo:inline>
								</fo:block>
								
							</fo:table-cell>
						</fo:table-row>
					</fo:table-body>
				</fo:table>

			</fo:block>

		</fo:static-content>

		<fo:flow flow-name="xsl-region-body">
			<fo:block>

<!-- CONSTANCIA DE LIQUIDACION DE EXPENSAS -->

				<fo:table space-before="1mm" width="100%" font-size="small" table-layout="fixed" >
					<fo:table-column column-width="proportional-column-width(100)"/>
					<fo:table-body start-indent="0pt">					
						<fo:table-row height="10mm">
							<fo:table-cell display-align="center" text-align="center">
								<fo:block padding-bottom="5mm" font-size="14pt" font-family="sans-serif">
									<fo:inline font-weight="bold" text-decoration="underline">CONSTANCIA DE LIQUIDACION DE EXPENSAS</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
						<fo:table-row>
							<fo:table-cell padding="0" display-align="center">
								<fo:block>
									<fo:table width="100%" font-size="small" table-layout="fixed" >
										<fo:table-column column-width="proportional-column-width(65)"/>
										<fo:table-column column-width="proportional-column-width(35)"/>
										<fo:table-body start-indent="0pt">
											<fo:table-row height="4mm">
												<fo:table-cell padding-right="1mm" text-align="right" display-align="center">
													<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
														<fo:inline>Edificio:</fo:inline>
													</fo:block>
												</fo:table-cell>
												<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
													<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
														<xsl:value-of select="expensa/nombreEdificio"/>
													</fo:block>
												</fo:table-cell>
											</fo:table-row>
										</fo:table-body>
									</fo:table>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
						<fo:table-row height="3mm">
						</fo:table-row>
						<fo:table-row>
							<fo:table-cell padding="0" display-align="center">
								<fo:block>
									<fo:table width="100%" font-size="small" table-layout="fixed" >
										<fo:table-column column-width="proportional-column-width(65)"/>
										<fo:table-column column-width="proportional-column-width(35)"/>
										<fo:table-body start-indent="0pt">
											<fo:table-row height="4mm">
												<fo:table-cell padding-right="1mm" text-align="right" display-align="center">
													<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
														<fo:inline>UF Nro:</fo:inline>
													</fo:block>
												</fo:table-cell>
												<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
													<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
														<xsl:value-of select="expensa/uf"/>
													</fo:block>
												</fo:table-cell>
											</fo:table-row>
										</fo:table-body>
									</fo:table>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
						<fo:table-row height="10mm">
						</fo:table-row>
					</fo:table-body>
				</fo:table>


<!-- Detalle de Expensas Ordinarias o Extraordinarias-->

				<fo:table space-before="1mm" width="100%" font-size="small" table-layout="fixed" >
					<fo:table-column column-width="proportional-column-width(1)"/>
								
					<fo:table-body start-indent="0pt">
						<fo:table-row height="3mm">
							<fo:table-cell display-align="center" background-color="#C0C0C0" padding-left="1mm">
								<fo:block padding-top="0.5mm" font-size="8pt" font-family="sans-serif">
									<fo:inline font-weight="bold">Detalle de Expensas <xsl:value-of select="expensa/tipoDetalle"/></fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
					</fo:table-body>
				</fo:table>

				<fo:table space-before="1mm" width="100%" font-size="small" table-layout="fixed" >
					<fo:table-column column-width="proportional-column-width(13)"/>
					<fo:table-column column-width="proportional-column-width(10)"/>
					<fo:table-column column-width="proportional-column-width(4)"/>
					<fo:table-column column-width="proportional-column-width(5)"/>
					<fo:table-column column-width="proportional-column-width(10)"/>
					<fo:table-column column-width="proportional-column-width(58)"/>
					<fo:table-body start-indent="0pt">
						<fo:table-row height="4mm">
							<fo:table-cell display-align="center">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>Liquidación Nro:</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
									<xsl:value-of select="expensa/liquidacionNro"/>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell display-align="center">
								<fo:block></fo:block>
							</fo:table-cell>
							<fo:table-cell display-align="center">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>Tipo:</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
									<xsl:value-of select="expensa/tipo"/>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell display-align="center">
								<fo:block></fo:block>
							</fo:table-cell>
						</fo:table-row>
					</fo:table-body>
				</fo:table>

				<fo:table space-before="1mm" width="100%" font-size="small" table-layout="fixed" >
					<fo:table-column column-width="proportional-column-width(23)"/>
					<fo:table-column column-width="proportional-column-width(15)"/>
					<fo:table-column column-width="proportional-column-width(62)"/>
					<fo:table-body start-indent="0pt">
						<fo:table-row height="4mm">
							<fo:table-cell display-align="center">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>Monto:</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
									<xsl:value-of select="expensa/monto"/>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell display-align="center">
								<fo:block></fo:block>
							</fo:table-cell>
						</fo:table-row>
					</fo:table-body>
				</fo:table>

				<fo:table space-before="1mm" width="100%" font-size="small" table-layout="fixed" >
					<fo:table-column column-width="proportional-column-width(23)"/>
					<fo:table-column column-width="proportional-column-width(15)"/>
					<fo:table-column column-width="proportional-column-width(62)"/>
					<fo:table-body start-indent="0pt">
						<fo:table-row height="4mm">
							<fo:table-cell display-align="center">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>Intereses:</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
									<xsl:value-of select="expensa/intereses"/>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell display-align="center">
								<fo:block></fo:block>
							</fo:table-cell>
						</fo:table-row>
					</fo:table-body>
				</fo:table>

				<fo:table space-before="1mm" width="100%" font-size="small" table-layout="fixed" >
					<fo:table-column column-width="proportional-column-width(23)"/>
					<fo:table-column column-width="proportional-column-width(15)"/>
					<fo:table-column column-width="proportional-column-width(62)"/>
					<fo:table-body start-indent="0pt">
						<fo:table-row height="4mm">
							<fo:table-cell display-align="center">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>Deuda Previa:</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
									<xsl:value-of select="expensa/deuda"/>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell display-align="center">
								<fo:block></fo:block>
							</fo:table-cell>
						</fo:table-row>
					</fo:table-body>
				</fo:table>

				<fo:table space-before="1mm" width="100%" font-size="small" table-layout="fixed" >
					<fo:table-column column-width="proportional-column-width(23)"/>
					<fo:table-column column-width="proportional-column-width(15)"/>
					<fo:table-column column-width="proportional-column-width(62)"/>
					<fo:table-body start-indent="0pt">
						<fo:table-row height="4mm">
							<fo:table-cell display-align="center">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>Período:</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
									<xsl:value-of select="expensa/periodo"/>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell display-align="center">
								<fo:block></fo:block>
							</fo:table-cell>
						</fo:table-row>
					</fo:table-body>
				</fo:table>
				
				<fo:table space-before="1mm" width="100%" font-size="small" table-layout="fixed" >
					<fo:table-column column-width="proportional-column-width(23)"/>
					<fo:table-column column-width="proportional-column-width(15)"/>
					<fo:table-column column-width="proportional-column-width(62)"/>
					<fo:table-body start-indent="0pt">
						<fo:table-row height="4mm">
							<fo:table-cell display-align="center">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
									<fo:inline>Vencimiento:</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
								<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
									<xsl:value-of select="expensa/vencimiento"/>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell display-align="center">
								<fo:block></fo:block>
							</fo:table-cell>
						</fo:table-row>
					</fo:table-body>
				</fo:table>

				<xsl:if test="expensa/vencimiento2 != null">			
					<fo:table space-before="1mm" width="100%" font-size="small" table-layout="fixed" >
						<fo:table-column column-width="proportional-column-width(23)"/>
						<fo:table-column column-width="proportional-column-width(15)"/>
						<fo:table-column column-width="proportional-column-width(62)"/>
						<fo:table-body start-indent="0pt">
							<fo:table-row height="4mm">
								<fo:table-cell display-align="center">
									<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
										<fo:inline>Segundo Vencimiento:</fo:inline>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
									<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
										<xsl:value-of select="expensa/vencimiento2"/>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell display-align="center">
									<fo:block></fo:block>
								</fo:table-cell>
							</fo:table-row>
						</fo:table-body>
					</fo:table>
				
					<fo:table space-before="1mm" width="100%" font-size="small" table-layout="fixed" >
						<fo:table-column column-width="proportional-column-width(23)"/>
						<fo:table-column column-width="proportional-column-width(15)"/>
						<fo:table-column column-width="proportional-column-width(62)"/>
						<fo:table-body start-indent="0pt">
							<fo:table-row height="4mm">
								<fo:table-cell display-align="center">
									<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif">
										<fo:inline>Interes al segundo vencimiento:</fo:inline>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell border-width=".2mm" border-color="black" border-style="solid" display-align="center" padding-left="0.5mm">
									<fo:block padding-top="1mm" font-size="8pt" font-family="sans-serif" font-weight="bold">
										<xsl:value-of select="expensa/intereses2"/>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell display-align="center">
									<fo:block></fo:block>
								</fo:table-cell>
							</fo:table-row>
						</fo:table-body>
					</fo:table>
				</xsl:if>

			</fo:block>
			<fo:block id="theEnd"/>
		</fo:flow>


	</fo:page-sequence>
</fo:root>

</xsl:template>

<xsl:template match="logo">
	<fo:block font-size="7pt" font-weight="normal" width="15mm">
		<fo:external-graphic src="{.}"/>
	</fo:block>
</xsl:template>

<xsl:template match="imgCompania">
	<fo:block font-size="7pt" font-weight="normal" width="15mm">
		<fo:external-graphic src="{.}"/>
	</fo:block>
</xsl:template>

<xsl:template match="signature">
	<fo:block font-size="7pt" font-weight="normal" width="15mm">
		<fo:external-graphic src="{.}"/>
	</fo:block>
</xsl:template>

</xsl:stylesheet>